package cn.silver.module.oss.bean;

import cn.silver.framework.core.validate.AddGroup;
import cn.silver.framework.core.validate.EditGroup;
import cn.silver.framework.tenant.model.TenantTreeBean;
import cn.silver.module.oss.domain.OssCatalog;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author zhouxiaobo
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OssCatalog.class)
@Schema(name = "OssCatalogBean", title = "对象存储管理-存储目录信息管理")
public class CatalogBean extends TenantTreeBean<CatalogBean> implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 目录类型
     */
    @Schema(title = "目录类型")
    @NotBlank(message = "目录类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private String type;
    /**
     * 文件类别
     */
    @Schema(title = "文件类别")
    @NotBlank(message = "文件类别不能为空", groups = {AddGroup.class, EditGroup.class})
    private String category;
    /**
     * 文件信息
     */
    @Schema(title = "文件信息")
    private String fileId;
    /**
     * 文件大小
     */
    @Schema(title = "文件大小")
    private Long fileSize;
    /**
     * 业务对象
     */
    @Schema(title = "业务对象")
    private String busId;
    /**
     * 业务类型
     */
    @Schema(title = "业务类型")
    private String busType;

}
